Skip to content

Add the IOExtend browser tools site source - #13

Draft
mahach666 wants to merge 25 commits into
mainfrom
codex/ioextend-web-browser-tools
Draft

mahach666 wants to merge 25 commits into
mainfrom
codex/ioextend-web-browser-tools

Conversation

@mahach666

@mahach666 mahach666 commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Parallel browser reader checkpoint

The small-RVT profile can now be rebuilt from this PR, public RvtIO main plus #310, and the pinned IOViewer revision. Instructions are in site/README.md. The source patch applies to a separate browser build of RvtIO. The coordinator streams the native runtime through the .NET SDK loader and shares its bytes with the decoder workers.

Three Chromium runs on the original Revit 2027 architectural sample showed the first visible frame in 10.890, 10.428 and 10.331 seconds (median 10.428 seconds). The previous reproducible single-worker median was 24.073 seconds. Each run checked the complete scene, native metadata and properties, the known browser geometry digest, and one native WASM fetch. Files larger than 50 MiB use the paged reader.

Changes

  • Add the IOExtend browser tools under site/, including the branded UI and versioned static assets.
  • Open RVT and NWC locally in the browser. Use the browser's private file storage for paged RVT previews.
  • Export models and create Revit copies for earlier versions. Detect the source release from metadata and include reduced year profiles, their generator, and conversion reports.
  • Show progress by stage, measured counts, elapsed time, and batch progress. Report WebAssembly memory errors and document the larger export heap build.
  • Add eleven locales with a browser-driven Auto mode and manual selection. Use the localized IOViewer for standalone RVT and NWC HTML downloads.
  • Include source build instructions, design notes, and browser smoke tests.

The tested local-page build uses IOViewer #81, IOViewer #82, and RvtIO #308. The Revit downgrade and NwcIO source revisions are recorded in the site README. This draft preserves the source for review before a Pages setup.

Validation

  • Built the site from this checkout with dotnet publish, using the IOViewer and RvtIO source references.
  • Ran the warm-cache and localization smoke tests from this checkout against the tested local site.
  • The local browser build passed RVT and NWC opening, extraction and cancellation checks, export downloads, and Revit downgrade with reports.
  • Verified the language selection on embedded RVT and NWC viewers and in offline HTML exports.
  • Inspected the reduced Revit profiles. Their compound files contain the release and build metadata, archive header, and class table.

RvtIO main comparison

The comparative build profile can compile against RvtIO without the scratch API from #308. It uses the guarded browser post-processing from RvtIO #310.

On the public structural Revit sample, Compact JSON dropped from 88.6 s to 47.5 s and matched byte for byte. The first browser frame took 33.4 s on the scratch build and 45.9 s on the new candidate. Both rendered a scene with 484 instances and 84,494 triangles. The default build retains the scratch API from #308 for large files.

Threaded viewer experiment

Adds an opt-in .NET 10 AOT viewer profile using shared WebAssembly memory and the bounded decode batches in IOExtend/RvtIO#311. It preserves the single-threaded build as the default.

The threaded build uses either COOP/COEP from the static host or a scoped Service Worker. Chromium rendered the public structural sample using both configurations. The sandboxed render frame receives the self-contained viewer locally when Service Worker isolation is active. The scene packages compare byte for byte. The existing single-threaded browser suite passed with the updated web assets.

A repeat run exposed a WebAssembly bounds trap in the initial threaded AOT candidate. Treat the threaded profile as experimental while browser stability and throughput are validated.

Browser viewer checkpoint

  • Use one selected RVT across View, Export, and Revit Version. Start 3D rendering when View opens and preserve the camera when switching tabs.
  • Restyle the language selector and record ioextend:first-frame after rendering.
  • Allow a versioned fast reader bundle for supported RVTs up to 50 MiB. Preserve the paged fallback when the reader or renderer fails, and support static hosts through a scoped Service Worker.

Chromium passed 13 fast-reader scenarios and the static release smoke test. Node passed four scratch-storage tests. On the Revit 2027 racbasicsampleproject.rvt fixture, the control browser reader rendered the full scene in 13.825 s. Clean RvtIO main wrote HTML in 9.438–9.466 s in the same series. The 8 s first-frame target remains open. This checkpoint contains site source.

Visible first frame on the Revit 2027 sample

On the original racbasicsampleproject.rvt, the local experimental reader incorporating RvtIO #329 displayed the complete scene in 9.737, 9.677 and 9.691 seconds. The browser check starts at file selection and samples the parent page after the ready iframe has been revealed and had a paint opportunity. Each run verified 466 elements, 730 instances, 403 packaged geometries, property data and a single WASM request. Clean RvtIO d6e7d8b exported standalone HTML in 7.101 seconds immediately after these runs. The gap to the median browser result is 2.590 seconds.

This PR includes the site timing change, the real-model regression check and the measurements in site/AUDIT.md. The experimental WASM bundle was built locally. All 13 fast-reader browser scenarios and the static-release smoke test passed.

RVT-only AOT build checkpoint

The optional IOExtendFastReader build uses full trimming and exports standalone HTML with the specified IOViewer source revision. NWC and paged viewing use the main reader. The default build and the AOT publish passed. Chromium passed all 14 fast-reader scenarios and the static release check. A real NWC opened with 4,035 instances through the main reader.

On the original Revit 2027 sample, clean RvtIO d6e7d8b raised Arg_PlatformNotSupported inside the fast reader. The site recovered through the paged reader and displayed the model in 60.448 s in a diagnostic run. The regression check now reports which WASM runtimes were loaded before examining the standalone canvas.

With the local parallel decoders and placement changes, the RVT-only profile displayed the complete scene in 8.870, 8.924, 8.912 and 8.864 s (median 8.891 s). Native HTML export took 6.952–7.059 s in the trim comparison. The experimental core and worker binaries are outside this PR. Source and measurements are in site/README.md and site/AUDIT.md.

Reproducible fast path using public sources

The browser stack identified a blocking task wait in ElementBuilder.PostProcess. The build instructions now combine RvtIO d6e7d8b with the published browser fix from RvtIO #310 in an isolated source directory. The fast reader uses a larger nursery on the pooled, small-RVT profile. Four Revit 2027 models retained identical scene sections across the two GC settings.

The published source revisions produced a visible frame in 24.212, 23.935 and 24.073 s on the original architectural sample. Each run loaded one WASM module and verified the full scene. The new native reference tool wrote the matching standalone HTML from clean main in 6.999 s immediately before this series. The reproducible gap is 17.074 s. The earlier 8.891 s median still describes the local experimental parallel decoder.

mahach666 and others added 20 commits November 25, 2026 04:39
Spool operation input, scratch, and downloadable results with bounded browser memory. Add an AOT large-heap profile, direct IFC scratch transfers with phase timings, and regression coverage for large offsets. Record the paged RFA and overview worker source alongside this checkpoint.
@mahach666

Copy link
Copy Markdown
Contributor Author

Browser operations checkpoint

Commit c090d90 adds OPFS-backed browser operations, the large-heap AOT profile, direct IFC scratch transfers and timing, and the paged viewer changes. The combined branch passed 16 Node tests, a local .NET 10 viewer publish, and the Chromium release smoke test. The publish used local RvtIO sources.

On the IFC control, the two scratch paths produced identical DATA sections in 18.765 s and 18.727 s. In the large-model run, native IFC export took 195.937 s. Chromium finished reading but reached the 20-minute timeout in product generation. The worker CPU profile spent about 14 of 15.1 seconds in Mono GC while building faceted-shell edge tables. The large downgrade finished its page census and ran out of memory in the writer.

The full 2 GiB workflow and native-speed target remain open. Measurements and verification

@mahach666

mahach666 commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor Author

Промежуточная фиксация даунгрейда

Потоковый писатель RVT опубликован в черновом RvtIO#365, коммит f7717440. Он записывает преобразованные страницы во временный контейнер и переиспользует результат планирования. Сохраняются проверка записанных данных, выпуск RVT после сохранения отчёта и явное разрешение на потери. В коде этого веб-PR правок для этой фиксации нет.

На коммите ядра прошли по 252 целевых теста на .NET 10 и .NET 8 x86. По 46 тестов с приватными фикстурами пропущены на каждой версии. На предыдущей сборке потокового писателя Chromium завершил синтетический даунгрейд без потерь, скачал побайтно совпадающий RVT и очистил OPFS. Крупный браузерный прогон прошёл прежнее место нехватки памяти и продолжает запись. Паритет с нативным временем пока не подтверждён.

Нативный прогон коммита f7717440 завершился за 146,4 с. Выходной RVT побайтно совпал с предыдущей потоковой сборкой, список пропущенных записей совпал. Время измерено при параллельном браузерном прогоне.

@mahach666

Copy link
Copy Markdown
Contributor Author

Промежуточный замер даунгрейда

В коммите 816540c браузер записывает RVT через ограниченный буфер OPFS. Разрешение на пропуски выключено по умолчанию и сбрасывается при смене файла или целевой версии. Сборка проверена с ядром 391ecf13 из RvtIO #365.

В одиночном прогоне даунгрейда Revit 2026 → 2024 Chromium сохранил результат за 182,0 с. Нативное ядро завершило ту же операцию за 80,8 с. RVT побайтно совпали, списки пропусков совпали, временное хранилище OPFS очистилось. Результат для отдельной малой модели открыт в Revit 2024. Открытие большой модели после даунгрейда в Revit 2024 пока не подтверждено.

Прошли 20 веб-тестов и release-smoke в Chromium. Паритет по времени и проверка всего диапазона моделей остаются открытыми.

@mahach666

Copy link
Copy Markdown
Contributor Author

Промежуточная фиксация 4e22dd3

В site/AUDIT.md записаны замеры на RVT около 2 ГиБ. В локальных AOT-сборках Chromium показал первый видимый кадр за 230,7 с, скачал IFC за 451,2 с и сохранил даунгрейд 2026 → 2024 за 177,2 с. Потоковое ядро даунгрейда опубликовано в RvtIO #365, коммит 584dcf25. Просмотр и IFC измерены с локальными исходниками. В этом коммите сайта добавлены результаты измерений.

Четыре дополнительных декодера дали кадр за 256,1 с при том же WASM и совпадающих файлах сцены. Режим остаётся экспериментальным. В браузерном IFC на семь сущностей DATA больше, чем в нативном. Скачанный RVT даунгрейда совпал с нативным побайтно. Открытие большой копии в Revit и паритет по времени остаются открытыми.

Все 20 веб-тестов прошли.

@mahach666

Copy link
Copy Markdown
Contributor Author

Intermediate browser performance checkpoint

  • Near the 2 GiB limit, the repeat Chromium viewer comparison went from 238.4 s to 226.8 s to first frame. Property reads went from 32.8 s to 25.9 s. The four paged-scene files matched byte for byte, and WebGL rendering and property lookup passed.
  • On the smaller model, IFC material association went from 0.51 s to 0.25 s as redundant OPFS reads were removed. Total save times were 18.28 s and 18.32 s. Both IFC DATA sections matched byte for byte.
  • Near the 2 GiB limit, the profiled Chromium run saved IFC in 435.5 s and matched the earlier browser IFC DATA section. The separate native run took 130.3 s with a background build. Both regular browser runs hit the 20-minute timeout before download. Native speed parity and repeatable large-model IFC export are still open.

These measurements use local experimental kernel builds. The snapshot passed 4,390 selected tests on each of .NET 10 and .NET 8 x86, with 32 skipped on each. All 20 web storage and worker tests passed. The downgrade checkpoint is tracked in RvtIO #365.

Measurements in site/AUDIT.md

@mahach666

Copy link
Copy Markdown
Contributor Author

Intermediate browser performance checkpoint

  • Two regular Chromium IFC exports near the 2 GiB limit finished in 369.4 s and 414.1 s after the facet validation changes. The two IFC DATA sections matched byte for byte and OPFS cleanup passed. A separate native run finished in 126.6 s while a build was running in the background.
  • The geometry archive changes reduced source geometry time in both paired viewer runs. The four paged scene files, WebGL rendering and property lookup passed. On the later parameter archive build, the derived property stage improved in a single pair, while time to first frame increased.
  • The latest build saved IFC with properties on the smaller model in 17.3 s and matched the earlier IFC DATA. Its regular run near the 2 GiB limit reached the 20-minute timeout during IFC product generation and produced no download. Browser downgrade was not rerun in this series. Native speed parity remains open.

The kernel snapshot passed 337 selected tests each on .NET 10 and .NET 8 x86, with seven skipped on each. All 20 web storage and worker tests passed.

Kernel checkpoint · Measurements in site/AUDIT.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant